package com.qfedu.service.impl;

import com.qfedu.dao.StudentDao;
import com.qfedu.pojo.Student;
import com.qfedu.service.StudentService;
import com.qfedu.utils.MyBatisUtil;

import java.util.List;

/**
 * @author:zhengyilong
 * @email:1797344574@qq.com
 * @phone:13479394730
 * @desc:
 * @DateTime:2022/4/23 10:42
 **/
public class StudentServiceImpl implements StudentService {

    private StudentDao studentDao = MyBatisUtil.getMapper(StudentDao.class);

    public boolean addStudent(Student student) {
        int i = studentDao.insertStudent(student);
        return i>0;
    }

    public List<Student> listStudent(){
        List<Student> list = studentDao.listStudents();
        return list;
    }
}

